package com.itheima.reggie.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@Slf4j
//@ControllerAdvice
public class GlobalControllerAdvice {

    /**
     * 拦截所有异常
     *
     * @param exception
     * @return
     */
    /*@ExceptionHandler(Exception.class)
    public R<String> handlerRuntimeException(Exception exception) {
        String exMessage = exception.getMessage();
        log.error("[控制器Advice,拦截所有异常],{}", exMessage);
        return R.error(exMessage);
    }*/
}
